/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hera.process.workflow.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author cmontes
 */
@Embeddable
public class StageRollupPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -2702841395766360909L;
	@Basic(optional = false)
    @Column(name = "ID_STAGE")
    private Long idStage;
    @Basic(optional = false)
    @Column(name = "ID_STAGE_NEXT")
    private Long idStageNext;

    public StageRollupPK() {
    }

    public StageRollupPK(Long idStage, Long idStageNext) {
        this.idStage = idStage;
        this.idStageNext = idStageNext;
    }

    public Long getIdStage() {
        return idStage;
    }

    public void setIdStage(Long idStage) {
        this.idStage = idStage;
    }

    public Long getIdStageNext() {
        return idStageNext;
    }

    public void setIdStageNext(Long idStageNext) {
        this.idStageNext = idStageNext;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idStage != null ? idStage.hashCode() : 0);
        hash += (idStageNext != null ? idStageNext.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof StageRollupPK)) {
            return false;
        }
        StageRollupPK other = (StageRollupPK) object;
        if ((this.idStage == null && other.idStage != null) || (this.idStage != null && !this.idStage.equals(other.idStage))) {
            return false;
        }
        if ((this.idStageNext == null && other.idStageNext != null) || (this.idStageNext != null && !this.idStageNext.equals(other.idStageNext))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.hera.process.data.domain2.StageRollupPK[ idStage=" + idStage + ", idStageNext=" + idStageNext + " ]";
    }
    
}
